// 地图默认时间
function dataHandle() {
  let t = new Date()
  let year = t.getFullYear()
  let month = t.getMonth() + 1
  let day = t.getDate()
  let hours = t.getHours()
  let mins = t.getMinutes()
  let seconds = t.getSeconds()
  if (month < 10 && day >= 10) {
    return `${year}/0${month}/${day}`
  } else if (day < 10 && month >= 10) {
    return `${year}/${month}/0${day}`
  } else if (day < 10 && month < 10) {
    return `${year}/0${month}/0${day}`
  } else {
    return `${year}/${month}/${day}`
  }
}

function dataHandle1() {
  let t = new Date()
  let year = t.getFullYear()
  let month = t.getMonth() + 1
  let day = t.getDate()
  let hours = t.getHours()
  let mins = t.getMinutes()
  let seconds = t.getSeconds()
  if (month < 10 && day >= 10) {
    return `${year}-0${month}-${day}`
  } else if (day < 10 && month >= 10) {
    return `${year}-${month}-0${day}`
  } else if (day < 10 && month < 10) {
    return `${year}-0${month}-0${day}`
  } else {
    return `${year}-${month}-${day}`
  }
}

module.exports = {
  dataHandle,
  dataHandle1,
}